]> dgit.raspbian.org Git - nodejs.git/commit
tls: fix case-sensitive SNI context matching
authorMatteo Collina <hello@matteocollina.com>
Mon, 20 Apr 2026 16:06:29 +0000 (18:06 +0200)
committerBastien Roucariès <rouca@debian.org>
Sun, 16 Aug 2026 17:34:06 +0000 (19:34 +0200)
commitb5b0f48c1a60e85784bb010d2d298ca54be6d7f8
tree8d308838f0b14ea93c81d98a261eb6448295dc15
parent2aacec2ff42b32c52a5cdc224b6d92fa6297542e
tls: fix case-sensitive SNI context matching

The regex constructed by server.addContext() lacked the case-insensitive
flag, causing uppercase or mixed-case SNI hostnames from ClientHello to
miss their intended context and fall back to the default context. This
violates RFC 6066 Section 3, which states that DNS hostnames are
case-insensitive. In mTLS configurations with per-tenant contexts, this
allowed bypassing client certificate authorization by simply
uppercasing the SNI hostname.

Add the 'i' flag to the RegExp in addContext() so that SNI matching
is case-insensitive.

PR-URL: https://github.com/nodejs-private/node-private/pull/857
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-48928
Refs: https://hackerone.com/reports/3656869
origin: backport, https://github.com/nodejs/node/commit/39d1d0968471a144d93dc293d640008f57d3c58e

Gbp-Pq: Topic sec
Gbp-Pq: Name CVE-2026-48928.patch
lib/_tls_wrap.js